﻿using System;
using System.Collections.Generic;
using Qadir.MVC.Streamline;

namespace QadirMVCStreamlineConsoleSample
{
    [View("Chooser")]
    public class Chooser
    {
        public Chooser()
        {

        }

        public static void Make(IModel parent, Dictionary<string, object> args)
        {
            Console.WriteLine("Press 1 for option 1, or any other key for option 2.");
            string str = Console.ReadLine();
            string option = (str.Trim() == "1") ? "Option1" : "Option2";
            (parent as Streamline).ShowView(option, new Dictionary<string, object>());
        }

        public static void Make2(IModel parent, Dictionary<string, object> args)
        {
            Console.WriteLine("Press 1 for option 1, or any other key for option 2.");
            string str = Console.ReadLine();
            string option = (str.Trim() == "1") ? "Option1" : "Option2";
            (parent as Streamline).ShowView(option, new Dictionary<string, object>());
        }
    }
}
